# -*- coding: utf-8 -*-

"""
Time    :2021/6/15 下午8:35
Author  :chenyang
Email   :chenyang.it@outlook.com
FileName: config.py
Software: PyCharm
"""
import os

BASE_DIR = os.path.abspath(os.path.dirname(__file__))

# 实际使用随机字符串
SECRET_KEY = "123456"

# 数据库公用配置
# 无警告
SQLALCHEMY_TRACK_MODIFICATIONS = False
# 自动提交
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
DB_USER = 'root'
DB_PASSWD = 'password'
DB_HOST = '127.0.0.1'
DB_PORT = '3306'
DB_NAME = 'cmdb'
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{username}:{password}@{hostname}:{port}/{dbname}?charset=utf8'.format(
    username=DB_USER, password=DB_PASSWD, hostname=DB_HOST, port=DB_PORT, dbname=DB_NAME)
